public with sharing class OpportunityCloneExtensionsTest {
//Test1 
//create an opportunity of type AAS
//clone the opportunity
//check if it is redirecting to opportunity page with default values set.
public static testMethod void CloneAASOpportunity() {
     Opportunity aas_opp = New Opportunity();
     aas_opp.Name            = 'AAS Opportunity';
     aas_opp.RecordTypeId    = RecordTypeHelper.GetRecordTypeId('Opportunity', 'Advanced Ad Solutions');
     aas_opp.StageName= 'Proposal Requested by AE';
     aas_opp.CloseDate = Date.today()+30;
     insert aas_opp;
     PageReference pageRef = New PageReference('/006');
     Test.setCurrentPage(pageRef);
      
     //add recordtype parameters to URL
     ApexPages.currentPage().getParameters().put('id', aas_opp.Id );
     OpportunityCloneExtensions cloneExtension = New OpportunityCloneExtensions();
     PageReference retUrl = cloneExtension.autoRun();
      //check if default values are present 
      //retURL = '&opp11='+ aas_opp.StageName +'&opp12=' + aas_opp.Probability +'&opp9=' + aas_opp.closeDate;
     System.assertEquals(retURL.getParameters().get('opp11'),aas_opp.StageName);
    
     DateTime dt= Datetime.now()+30; 
     System.assertEquals(retURL.getParameters().get('opp9'), dt.format('MM/dd/yyyy')); 
  }


public static testMethod void ToString() {
   string closeDate = OpportunityCloneExtensions.ToString(Date.today()+ 30, 'MM/dd/yyyy');
   System.assertNotEquals(closeDate, '');
}

//Test2 
//create an opportunity of type NON AAS
//clone the opportunity
//check if it is redirecting to opportunity page with no default values set.

}